import 'package:flutter/material.dart';
import 'package:syn_4s/core/extension/int_extension.dart';

import '../shared/app_theme.dart';

/**
 * 阴影效果
 */
class ShadowContainer extends StatelessWidget {
  final EdgeInsetsGeometry? margin;
  final EdgeInsetsGeometry? padding;
  final BoxBorder? border;
  final Widget? child;
  final BorderRadiusGeometry? borderRadius;
  final double? width,height;

  const ShadowContainer(
      {super.key,
      this.margin,
      this.border,
      this.child,
      this.padding,
      this.borderRadius,
      this.width,
      this.height
      });

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: padding,
      width: width ?? double.infinity,
      height: height,
      margin: margin,
      decoration: BoxDecoration(
          color: AppTheme.backgroundColors,
          shape: BoxShape.rectangle,
          border: border,
          borderRadius: borderRadius,
          boxShadow: [
            BoxShadow(color: AppTheme.orangeColor, blurRadius: 8.px)
          ]),
      child: child,
    );
  }
}
